package com.fumihiko.modules.wsbj.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fumihiko.modules.wsbj.entity.UpProBasicProcessEntity;
import com.fumihiko.modules.wsbj.entity.UpProProcessEntity;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fumihiko.common.utils.PageUtils;
import com.fumihiko.common.utils.Query;

import com.fumihiko.modules.wsbj.dao.UpProBasicDao;
import com.fumihiko.modules.wsbj.entity.UpProBasicEntity;
import com.fumihiko.modules.wsbj.service.UpProBasicService;


@Service("upProBasicService")
public class UpProBasicServiceImpl extends ServiceImpl<UpProBasicDao, UpProBasicEntity> implements UpProBasicService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        String idCards = (String)params.get("key");
        IPage<UpProBasicEntity> page = this.page(
                new Query<UpProBasicEntity>().getPage(params),
                new QueryWrapper<UpProBasicEntity>().eq("APPLYER_CARDCODE",idCards)
        );

        return new PageUtils(page);
    }

    @Override
    public IPage<UpProBasicProcessEntity> selectBasicPage(Page<UpProBasicProcessEntity> page, QueryWrapper<UpProBasicProcessEntity> queryWrapper) {
        return baseMapper.selectBasicPage(page,queryWrapper);
    }

    @Override
    public UpProBasicProcessEntity getValueById(String pkId) {
        return baseMapper.getValueById(pkId);
    }

    @Override
    public List<UpProProcessEntity> getList(QueryWrapper<UpProBasicProcessEntity> queryWrapper) {
        return baseMapper.getList(queryWrapper);
    }

}
